<?php

namespace App\Traits\Model;

trait CacheKey
{
    public function cacheKey(String $str = "*")
    {
        return sprintf(
            "%s_%s/%s-%s:%s",
            config('app.name'),
            $this->getTable(),
            $this->getKey(),
            $this->updated_at->timestamp,
            $str
        );
    }
}
